/*
 * Created by Julia on 2016/05/04.
 */
require(['business/dataimport/dataDeleteHistoryBiz', 'business/dataimport/dataRestoreHistoryBiz'], function (deleteBiz, restoreBiz) {
    appendBreadCrumb("data/import", $.i18n.prop('DI_HISTORY_TITLE'));
    deleteBiz.init();
    restoreBiz.init();
    var isINIT = true;
    $('#history a[href="#testFile"]').click(function (e) {
        e.preventDefault();
        $('#dt_testFiles').DataTable().draw();
        return;
    });

    $('#history a[href="#deleteTestFile"]').click(function (e) {
        e.preventDefault();
        if (isINIT) {
            restoreBiz.runDataTables();
            restoreBiz.initBasicSearchEvent();
            isINIT = false;
            return;
        }
        $('#dt_deleteTestFiles').DataTable().draw();
        return;
    });

    deleteBiz.runDataTables();
    deleteBiz.initBasicSearchEvent();
});


